home *** CD-ROM | disk | FTP | other *** search
-
- regc(2, "COMBINED_XFORM")
-
- regc(12, "FOG_PARAMS")
-
- regcn(14, "DIRECTIONAL_DIR_MS", 0)
-
- regc(20, "TEXTURE2_XFORM")
-
- // ------------ c40 - c60 reserved
- !include("vs_spot_consts.inc")
-
- vshader("
-
- #define point v0
- #define normal v1
- #define tcoord v3
-
- #define fogp c12
- #define ldir c14
-
- vs_1_1
-
- #include <cardef.h>
- #include <fog.inc>
-
- def c0, 0, 0, 0, 0
-
- dcl_position point
- dcl_normal normal
- dcl_texcoord tcoord
-
- ; output position
- m4x4 oPos, point, c2
-
- dp3 r4.x, normal, ldir ; diffuse N*L
-
- ; output diffuse
- mov oD0.w, r4.x // sun
- ;------------------------------------------
- // spot lights
- // used r0 - r2
- #if VS_SPOTLIGHTS
- #include <vs_spot_func.inc>
- #endif
- ;----------------------------
- ; output texcoords
- mov oT0, tcoord // color
- mov oT1, tcoord // dirt
-
- ; terrain lightmap texgen (from model space)
- dp4 oT2.x, point, c20
- dp4 oT2.y, point, c21
-
- ; calc fog
- dp4 r0.x, point, c4
- FOG(r0.x, fogp, r10)
- ")
-
-